<template>
  <view class="common-btn" hover-class="hover-active" :hover-stay-time="200" @click="handleFn">
    <view class="btn-icon">
      <slot name="icon"></slot>
    </view>
    <slot></slot>
  </view>
</template>

<script setup>
const emits = defineEmits(["click"]);

const props = defineProps({
  style: {
    type: Object,
    default: () => ({
      background: "transparent",
    }),
  },
});

const handleFn = () =>{
  emits('click')
}
</script>

<style lang=scss scoped>
.common-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 2rpx;
}

.btn-icon {
  margin-bottom: -10rpx;
  margin-right: 10rpx;
}
</style>